import { eMenuType } from '@/interface/enum';
import { RouteRecordRaw } from 'vue-router';
import { iRouteMeta } from '@/interface/iRouteInfo';
import { getMenuImageUrl } from '@/utils/ui';

const mainHomeMeta: iRouteMeta = {
    menu_show: true,
    menu_type: eMenuType.MENU,
    normal: getMenuImageUrl('watch.png'),
    // hover: getMenuImageUrl('room_hover.png'),
    parentPath: '',
    sort: 1,
    title: '监控大屏',
    elements: [
        // {
        //   key: 'online_pay_refund',
        //   title: '退款功能',
        //   local_path: RouterConfig.Main.fullPath,
        //   menu_type: eMenuType.ELEMENT,
        // },
    ],
};

export const large_screen_routes: RouteRecordRaw = {
    name: 'large_screen',
    path: '/large_screen',
    meta: mainHomeMeta,
    redirect: '/large_screen/zfn',
    component: () => import('@/layout/ContentLayout.vue'),
    children: [
        {
            path: '/large_screen/zfn',
            name: 'zfn',
            redirect: '/large_screen/zfn/overview',
            meta: {
                menu_show: true,
                menu_type: eMenuType.MENU,
                title: '在线监测',
                parentPath: '/large_screen',
                sort: 1,
            },
            component: () => import('@/views/large_screen/zfn/index.vue'),
            children: [
                {
                    path: '/large_screen/zfn/overview',
                    name: 'zfn_overview',
                    meta: {
                        menu_show: true,
                        menu_type: eMenuType.PAGE,
                        title: '中氟能概览',
                        parentPath: '/large_screen/zfn',
                        sort: 1,
                    },
                    component: () => import('@/views/large_screen/zfn/overview/index.vue'),
                },
                // {
                //     path: '/large_screen/zfn/fx/:id',
                //     name: 'zfn_fx',
                //     meta: {
                //         menu_show: true,
                //         menu_type: eMenuType.PAGE,
                //         title: '分析站房',
                //         parentPath: '/large_screen/zfn',
                //         sort: 1,
                //     },
                //     component: () => import('@/views/large_screen/zfn/fenxi/index.vue'),
                // },
            ],
        },
        {
            path: '/large_screen/biaoza',
            name: 'biaoza',
            meta: {
                menu_show: false,
                menu_type: eMenuType.PAGE,
                title: '硅料表杂概览',
                auth: ['硅料表杂'],
                parentPath: '/large_screen',
                sort: 1,
            },
            component: () => import('@/views/large_screen/biaoza/index.vue'),
            children: [],
        },
    ],
};
